﻿@using Janus.Mes.WebClient;
@using Janus.BaseEntitys;
@using Janus.Mes.VO;
@model ManagementListVO
@{
    Layout = null;
    ViewBag.ViewTitle = "HMI清单";
    Model.Category = "hmi";
    if (ViewBag.IsCreate)
    {
        Model.IsEnable = true;
    }
}
<div class="pageContent">
    <form method="post" action="BaseData/HMI/create?OpID=@ViewData["OperateID"]" class="pageForm required-validate"
          onsubmit="return validateCallback(this, dialogAjaxDone);">
        @Html.ValidationSummary(true)
        <div class="pageFormContent" layouth="56">
            <input id="hidIsCreate" name="hidIsCreate" type="hidden" value="@ViewBag.IsCreate" />
            @Html.HiddenFor(model => model.Id)
            @Html.HiddenFor(model => model.Category)
            <p>
                <label>
                    编码：
                </label>
                @if (ViewBag.IsCreate == true)
                {
                    @Html.TextBoxFor(c => c.Code, new { @class = "required IsExisted", ajax = "BaseData/HMI/IsExist" })
                }
                else
                {
                    @Html.TextBoxFor(c => c.Code, new { @class = "" })
                }
                @Html.ValidationMessageFor(c => c.Code)
            </p>
            <p>
                <label>
                    名称：
                </label>
                @Html.TextBoxFor(c => c.Name, new { @class = "required" })
                @Html.ValidationMessageFor(c => c.Name)
            </p>
            <p>
                <label>
                    品牌：
                </label>
                @Html.TextBoxFor(c => c.Brand, new { @class = "required" })
                @Html.ValidationMessageFor(c => c.Brand)
            </p>
            <p>
                <label>
                    型号：
                </label>
                @Html.TextBoxFor(c => c.Model, new { @class = "required" })
                @Html.ValidationMessageFor(c => c.Model)
            </p>
            <p>
                <label>
                    启用：
                </label>
                @Html.CheckBoxFor(c => c.IsEnable, new { @onclick = "return false" })
            </p>
            <p style="width:100%;">
                <label>
                    备　　注：
                </label>
                @Html.TextAreaFor(c => c.Remark, new { style = "width:65%;height:50px;" })
                @Html.ValidationMessageFor(c => c.Remark)
            </p>
            <p></p>
            <p></p>
            @Html.Partial("Operation", Model)
        </div>
        @Html.Partial("FormButtonBar")
    </form>
</div>
